<?php

class JS_ConditionNode extends JS_Node {
	
	public function __construct() {
		parent::__construct();
	}
	
	public function &getValue() {
		return ($this->parent && $this->parent->getNodeType('JS_ForNode') ? 
			array($this->getChild(0),$this->getChild(1),$this->getChild(2)) : $this->getChild(0));
	}
	
	public function interpret() {}
	
	public function __toString() {
		$i = 0; $cond = array();
		while ($i < $this->count) {
			$cond[] = $this->children[$i]->__toString();
			++$i;
		}
		return implode(' ', $cond);
	}
}

?>